package com.deparse.dpframe.utils;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by hsy on 2016/4/7.
 */
public class DPToastUtil {
    private static Toast toast;

    public static void showToast(Context applicationContext, String msg) {
        if (null == toast) {
            toast = Toast.makeText(applicationContext, msg, Toast.LENGTH_SHORT);
        } else {
            toast.setText(msg);
        }
        toast.show();
    }

    public static void showToast(Context applicationContext, int msg) {
        DPToastUtil.showToast(applicationContext, applicationContext.getString(msg));
    }
}
